package org.jeecg.common.util.p000a.p001a;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import java.util.HashMap;
import java.util.Map;
import org.jeecg.common.util.p000a.CommonProperty;
import org.jeecg.modules.online.cgform.utils.CgformUtil;

/* renamed from: org.jeecg.common.util.a.a.h */
/* loaded from: hibernate-re-3.7.1-RC.jar:org/jeecg/common/util/a/a/h.class */
public class SwitchProperty extends CommonProperty {

    /* renamed from: m */
    private String f30m;

    public SwitchProperty() {
    }

    public SwitchProperty(String str, String str2, String str3) {
        this.type = "string";
        this.view = CgformUtil.f240L;
        this.key = str;
        this.title = str2;
        this.f30m = str3;
    }

    @Override // org.jeecg.common.util.p000a.CommonProperty
    public Map<String, Object> getPropertyJson() {
        HashMap hashMap = new HashMap(5);
        hashMap.put("key", getKey());
        JSONObject commonJson = getCommonJson();
        JSONArray jSONArray = new JSONArray();
        if (this.f30m != null) {
            try {
                jSONArray = JSONArray.parseArray(this.f30m);
            } catch (JSONException e) {
                JSONObject parseObject = JSONArray.parseObject(this.f30m);
                if (parseObject.containsKey(CgformUtil.f302aV)) {
                    jSONArray = parseObject.getJSONArray(CgformUtil.f302aV);
                }
            }
            commonJson.put("extendOption", jSONArray);
        }
        if (super.getPattern() != null) {
            commonJson.put("pattern", super.getPattern());
        }
        if (super.getErrorInfo() != null) {
            commonJson.put("errorInfo", super.getErrorInfo());
        }
        hashMap.put("prop", commonJson);
        return hashMap;
    }
}
